package br.com.quad.seguranca.util;

import java.io.FileInputStream;
import java.io.IOException;
import java.net.SocketException;
import org.apache.commons.net.ftp.FTPClient;

public class SoAutosFTP {
	public static void main(String[] args) throws SocketException, IOException {
		FTPClient ftp = new FTPClient();
		ftp.connect("200.219.214.60");
		ftp.login("soautosSite", "q1w2e3");
		ftp.mkd("TESTE");
		FileInputStream arqEnviar = new FileInputStream("C://RHDSetup.log");
		ftp.setFileType( FTPClient.BINARY_FILE_TYPE ); 
		
		if (ftp.storeFile("RHDSetup.log", arqEnviar)) {
			System.out.println("Arquivo armazenado com sucesso!");

		} else {
			System.out.println("Erro ao armazenar o arquivo.");
		}
	}
}